package com.google.android.wallet.sample;

import android.os.Handler;
import android.os.Message;

public abstract class CallbackHandler extends Handler {

    protected static final int SUCCESS = 0;
    protected static final int FAILURE = 1;
    
    @Override
    public void handleMessage(Message msg) {
        switch(msg.what){
            case SUCCESS:
                onSuccess();
                break;
            case FAILURE:
                onFailure();
                break;
            default:
                break;
        }
    }

    public abstract void onSuccess();
    
    public abstract void onFailure();
    
}
